package com.csu54sher.basereservation.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 评价表
 * </p>
 *
 * @author csu54sher
 * @since 2025-10-19
 */
@Getter
@Setter
@Builder
@TableName("comment")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    /**
     * 评价ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 基地ID
     */
    @TableField("base_id")
    private Integer baseId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 预约ID
     */
    @TableField("reservation_id")
    private Long reservationId;

    /**
     * 评价内容
     */
    @TableField("comment")
    private String comment;

    /**
     * 环境打分
     */
    @TableField("environment_score")
    private Integer environmentScore;

    /**
     * 流程评分
     */
    @TableField("process_score")
    private Integer processScore;

    /**
     * 讲解评分
     */
    @TableField("explanation_score")
    private Integer explanationScore;

    /**
     * 整体评分
     */
    @TableField("total_score")
    private Integer totalScore;

    /**
     * 评价时间，默认数据库生成
     */
    @TableField("create_at")
    private LocalDateTime createAt;

    public static final String ID = "id";

    public static final String BASE_ID = "base_id";

    public static final String USER_ID = "user_id";

    public static final String RESERVATION_ID = "reservation_id";

    public static final String COMMENT = "comment";

    public static final String ENVIRONMENT_SCORE = "environment_score";

    public static final String PROCESS_SCORE = "process_score";

    public static final String EXPLANATION_SCORE = "explanation_score";

    public static final String TOTAL_SCORE = "total_score";

    public static final String CREATE_AT = "create_at";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
